package ch.elca.lol.puissance4.game;

import ch.elca.lol.puissance4.player.Player;

public class PlayerLoader {
	private PlayerLoader() {
	}
	
	public static Player loadPlayer(String className) {
		try {
			Class<? extends Player> plClass = (Class<? extends Player>) Class.forName(className);
			Player p = plClass.newInstance();
			return p;
		} catch(Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
